<% title "Forums" %>
 
<table>
  <tr>
    <th width="70%">Forum</th>
    <th width="30%">Last Post</th>
  </tr>
  <% for forum in @forums %>
    <tr>
      <td><h4><%= link_to h(forum.name), forum_path(forum.id) %></h4>
        <small><%= forum.topics.count %> topics</small><br />
        <%=h forum.description %></td>
      <td class="right"><% if forum.most_recent_post %>
  <%= distance_of_time_in_words_to_now forum.most_recent_post.last_post_at %> ago by
  <%= forum.most_recent_post.nombre_autor %>
  <% else %>no posts<% end %>
    </td>
      <td><%= link_to "Edit", edit_forum_path(forum) %></td>
      <td><%= link_to "Destroy", forum, :confirm => 'Are you sure?', :method => :delete %></td>
    </tr>
  <% end %>
</table>
 
<p><%= link_to "New Forum", new_forum_path %></p>
